import os
import matplotlib.font_manager as fm

# 获取项目根目录
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))

# 数据存储路径
DATA_PATH = r"F:\资料\期货"

# 尝试找到系统中的中文字体
system_fonts = fm.findSystemFonts()
chinese_fonts = [f for f in system_fonts if os.path.basename(f).startswith(('msyh', 'simhei', 'simsun'))]
FONT_PATH = chinese_fonts[0] if chinese_fonts else os.path.join(ROOT_DIR, "font", "msyhl.ttc")

# 报告存储路径
REPORT_PATH = os.path.join(DATA_PATH, "reports")
